package avicit.bdp.dds.api.service;

import avicit.bdp.common.base.BaseService;
import avicit.bdp.dds.dao.entity.TaskNodeType;
import avicit.bdp.dds.dao.mapper.TaskNodeTypeMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @金航数码科技有限责任公司
 * @作者：developer
 * @邮箱：developer@avic-digital.com
 * @创建时间： 2022-05-10
 * @类说明：TaskNodeTypeService
 * @修改记录：
 * @注意事项：
 * @主要功能：TaskNodeTypeService管理
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class TaskNodeTypeService extends BaseService<TaskNodeTypeMapper, TaskNodeType> {
    private static final Logger logger = LoggerFactory.getLogger(TaskNodeTypeService.class);

    @Autowired
    private TaskNodeTypeMapper taskNodeTypeMapper;

    /**
     * 按条件查询节点与类型映射关系列表
     * @param bean
     * @return
     */
    public List<TaskNodeType> searchNodeTypeList(TaskNodeType bean) {
        return this.taskNodeTypeMapper.searchNodeTypeList(bean);
    }

    /**
     * 根据指定条件删除
     * @param id
     * @param nodeId
     * @param type
     * @param orderBy
     * @param algoType
     * @return
     */
    public int deleteByCond(String id, String nodeId, String type, Integer orderBy, Integer algoType) {
        return this.taskNodeTypeMapper.deleteByCond(id, nodeId, type, orderBy, algoType);
    }
}
